package com.design.movieticket.controller;

import com.design.movieticket.common.base.constant.Result;
import com.design.movieticket.common.base.constant.ResultStatus;
import com.design.movieticket.service.DashBoardService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Slf4j
@Api(tags = "首页模块")
@RestController
@RequestMapping("/dashBoard")
public class DashBoardController {
    @Resource
    private DashBoardService dashBoardService;

    @GetMapping("/getLine")
    public Result getLine(String username, String userRole){
        System.out.println("juese" + userRole);
        return new Result(dashBoardService.getLine(username,userRole), ResultStatus.REQUEST_SUCCESS.getMsg(), ResultStatus.REQUEST_SUCCESS.getCode());
    }

    @GetMapping("/getCircle")
    public Result getCircle(){
        return new Result(dashBoardService.getCircle(), ResultStatus.REQUEST_SUCCESS.getMsg(), ResultStatus.REQUEST_SUCCESS.getCode());
    }

    @GetMapping("/getData")
    public Result getData(){
        return new Result(dashBoardService.getData(), ResultStatus.REQUEST_SUCCESS.getMsg(), ResultStatus.REQUEST_SUCCESS.getCode());
    }
}
